import React from 'react'
import styled from 'styled-components'
import Color from '../Color'

const LinearGradient = (props: Props) => {
    const { children, ...resetProps } = props
    return <Container {...resetProps}>{children}</Container>
}

const Container = styled.div`
    background-image: linear-gradient(
        to right,
        ${({ isGreen }) =>
            isGreen
                ? Color.linearGradienGreen.left
                : Color.linearGradienPurple.left},
        ${({ isGreen }) =>
            isGreen
                ? Color.linearGradienGreen.right
                : Color.linearGradienPurple.right}
    );
`
export default LinearGradient



// WEBPACK FOOTER //
// ./src/components/LinearGradient/index.js